PESetFont

Use PESetFont to set the font for field and/or text characters in the report section(s) specified. Use this call any time you need to change a default font at runtime in response to user input or to specify a built-in printer font.

C Syntax
BOOL CRPE_API PESetFont (
        short printJob,
        short sectionCode,
        short scopeCode,    
        const char FAR *faceName,
        short fontFamily,    
        short fontPitch,
        short charSet,    
        short pointSize,
        short isItalic,
        short isUnderlined,
        short isStruckOut,
        short weight );
Parameters

printJob

Specifies the print job for which you want to select a font.

sectionCode

Specifies the Section Codes for the report section(s) for which you want to select a font. See Working with section codes.

scopeCode

Specifies whether the font selected is to apply to fields only, to text only, or to both fields and text. To specify both fields and text, use the OR operator. Use one of the following codes.


Constant Description


PE_FIELDS

Sets the default font for all field values in the report section specified.


PE_TEXT

Sets the default font for all text (that has not been entered as a field value) in the report section specified.

faceName

Specifies a pointer to the actual face name of the font you want to use. The face name you pass can typically come from a Font dialog box, be hard coded in the application or be chosen by the application from the fonts supported on the printer. Example: "Times New Roman". Pass 0 for no change.

fontFamily

Specifies the font family for the font you want to use. Use one of the following FF_XXX constants.


Constant Description


FF_DONTCARE

No change.


FF_ROMAN

Variable pitch font with serifs.


FF_SWISS

Fixed pitch font without serifs.


FF_MODERN

Fixed-pitch font, with or without serifs.


FF_SCRIPT

Handwriting-like font.


FF_DECORATIVE

Fancy display font.

fontPitch

Specifies the font pitch you wish to use. Use a constant value for the font pitch as defined in WINDOWS.H. Use DEFAULT_PITCH if you wish to retain the current default.


Constant Description


DEFAULT_PITCH

0X00


FIXED_PITCH

0X01


VARIABLE_PITCH

0X02

charSet

Specifies the character set you wish to use. Use a constant value for the character set as defined in WINDOWS.H. Use DEFAULT_CHARSET if you wish to retain the current default.


Constant Value


ANSI_CHARSET

0


DEFAULT_
CHARSET

1


SYMBOL_
CHARSET

2


SHIFTJIS_
CHARSET

128


HANGEUL_
CHARSET

129


CHINESEBIG5_
CHARSET

136


OEM_CHARSET

255

pointSize

Specifies the desired point size for the selected font. Pass 0 for no change.

isItalic

Specifies whether the font selected should be italicized. Pass TRUE for Italic font, FALSE for non-Italic font, or PE_UNCHANGED to use the current default setting.

isUnderlined

Specifies whether the font selected should be underlined. Pass TRUE for Underline, FALSE for no Underline, or PE_UNCHANGED to use the current default setting.

isStruckOut

Specifies whether the font selected should be struck out. Pass TRUE for StrickOut, FALSE for no StrickOut, or PE_UNCHANGED to use the current default setting.

weight

Specifies the weight of the font. Use a constant value from the weight values defined in WINDOWS.H. Pass 0 for no change.


Constant Value


FW_DONTCARE

0


FW_THIN

100


FW_EXTRALIGHT

200


FW_LIGHT

300


FW_NORMAL

400


FW_MEDIUM

500


FW_SEMIBOLD

600


FW_BOLD

700


FW_EXTRABOLD

800


FW_HEAVY

900


FW_ULTRALIGHT

FW_EXTRALIGHT


FW_REGULAR

FW_NORMAL


FW_DEMIBOLD

FW_SEMIBOLD


FW_ULTRABOLD

FW_EXTRABOLD


FW_BLACK

FW_HEAVY

Returns
Remarks

This command includes a number of parameters:

VB Syntax
Declare Function PESetFont Lib "crpe32.dll" ( ByVal printJob As Integer,
    ByVal sectionCode As Integer, ByVal ScopeCode As Integer,
    ByVal FaceName As String, ByVal FontFamily As Integer,
    ByVal FontPitch As Integer, ByVal CharSet As Integer,
    ByVal PointSize As Integer, ByVal isItalic As Integer,
    ByVal isUnderlined As Integer, ByVal isStruckOut As Integer,
    ByVal Weight As Integer ) As Integer
Delpli Syntax
function PESetFont(
    printJob: Word;
    sectionCode: integer;
    scopeCode: integer;
    faceName: PChar;
    fontFamily: integer;
    fontPitch: integer;
    charSet: integer;
    pointSize: integer;
    isItalic: integer;
    isUnderlined: integer;
    isStruckOut: integer;
    weight: integer
    ): Bool stdcall;
dBASE for Windows Syntax
EXTERN CLOGICAL PESetFont (CWORD, CWORD, CWORD, CSTRING, CWORD, CWORD, 
CWORD, CWORD, CWORD, CWORD, CWORD, CWORD) CRPE.DLL


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com